package org.mybatis3.test5;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;
import java.util.Set;

public class Test7 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Dog d1=(Dog) context.getBean("dog6");

        System.out.println(d1.getName());
        Set<String> sons=d1.getSonSet();
        for (String d:sons){
            System.out.println("儿子:"+d);
        }
    }
}
